<?php
namespace app\common\model;
use think\Model;
use think\model\concern\SoftDelete;

class UserCoupon extends Model
{
    use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $defaultSoftDelete = 0;
    protected $autoWriteTimestamp = true;

    //等级
    protected function user()
    {
        return self::belongsTo(User::class, 'user_id')->bind(['phone'=>'mobile']);
    }
    
}